<!DOCTYPE html>
<html ng-app="indexApp">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <!--<link href="css/bootstrap-theme.css" rel="stylesheet">-->
    <link href="css/jquery-ui.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link href="css/sweetalert2.css" rel="stylesheet">
    <script src="js/angular/1.6.3/angular.js"></script>
    <script src="js/angular/1.6.3/angular-route.js"></script>
    <script src="js/angular/1.6.3/angular-ui-router.js"></script>
    <script src="js/angular/1.6.3/angular-file-upload.js"></script>
    <script src="js/jquery-2.1.4.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/jquery-ui.js"></script>
    <script src="js/sweetalert.min.js"></script>
    <script src="js/ie10-viewport-bug-workaround.js"></script>
    <script src="js/ie-emulation-modes-warning.js"></script>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=ZXQrCmgv2Bnee0X91HhKzmVb4w04blCe"></script>
    <script src="js/echarts.js"></script>
    <script src="js/bmap.js"></script>
    <script src="ng/indexApp.js"></script>
    <script src="ng/analysisCtrl.js"></script>
    <title>财务分析</title>
    <style type="text/css">
        .load-btn,.load-btn::before{
            width:80px;
            height:35px;
            line-height:1.42857143;
            text-align:center;
            padding: 6px 12px;
            margin-bottom: 0;
            font-size: 14px;
            font-weight: normal;
            white-space: nowrap;
            vertical-align: middle;
            -ms-touch-action: manipulation;
            touch-action: manipulation;
            cursor: pointer;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            background-image: none;
            border: 1px solid transparent;
            border-radius: 4px;
        }
        .load-btn{
            position:relative;
            background:#5ad;
            color:#fff;
            cursor:pointer;
        }
        .load-btn::before{
            content:"分析中…";
            position:absolute;
            display:none;
            z-index:2;
            top:0;
            left:0;
            color: #ffffff;
            text-shadow:rgba(100,0,0,1) 0 0 3px;
            background:linear-gradient(45deg,#55aadd 0%,#55aadd 20%,#59C2DD 20%, #59C2DD 45%,#55aadd 45%,#55aadd 70%,#59C2DD 70%, #59C2DD 95%,#55aadd 95%,#55aadd 100%);
            background-size:30px 30px;
            background-position:0 0;
            animation:click 1s infinite linear;
        }
        .load-btn.click::before{
            display:block;
            cursor:not-allowed;
        }
        @keyframes click {
            0%{
                background-position:0 0;
            }
            100%{
                background-position:30px 0;
            }
        }
    </style>
</head>
<body ng-controller="analysisCtrl">
<div class="container-fluid">
    <h3 class="page-header">财务分析
    </h3>

    <div class="col-md-12">
        <div class="row">
            <div class="col-md-5">
                <div class="row">
                    <div class="col-md-12">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                企业列表
                            </div>
                            <div  style="height:200px;overflow:auto;cursor:pointer">
                                <table
                                        class="table table-bordered table-striped table-condensed table-hover "
                                        ng-init="getEnterpriseList()" style="margin-bottom: 0;cursor:pointer">
                                    <tr ng-repeat="e in enterprises" ng-click="autoPlayState=false;showEnterpriseDetail(e)" ng-mouseover=""
                                        ng-style="{'background-color':e===enterpriseSelected ?'#aad3ff':''}">
                                        <td>{{$index + 1}}</td>
                                        <td>{{e.name}}</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>


            <div class="col-md-7">
                <div class="row">
                    <div class="col-md-12">
                        <div class="panel panel-default">
                            <div class="panel-heading">基本信息</div>
                            <div  style="height:200px;overflow:auto;">
                                <table ng-repeat="item in enterpriseInfo.basicInfoComments" ng-show="$index%2 == 0"
                                        class="table table-bordered table-striped table-condensed" style="margin-bottom: 0;">
                                    <tr>
                                        <td width="50%"><b>{{item.column_comment}}</b></td>
                                        <td width="50%"><b>{{enterpriseInfo.basicInfoComments[$index + 1].column_comment}}</b></td>
                                    </tr>
                                    <tr>
                                        <td width="50%" ng-show="item.column_name !== 'business_scope'">
                                            {{enterpriseInfo.basicInfo[0][item.column_name]}}</td>
                                        <td width="50%" ng-show="item.column_name !== 'business_scope'">
                                            {{enterpriseInfo.basicInfo[0][enterpriseInfo.basicInfoComments[$index + 1].column_name]}}</td>
                                        <td ng-show="item.column_name === 'business_scope'" colspan="2">
                                            {{enterpriseInfo.basicInfo[0][item.column_name]}}</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>



        <div class="row">
            <div class="col-md-12">
                <div class="row">
                    <div class="col-md-12">
                        <div class="panel panel-default">
                            <div class="panel-heading">分析结果</div>
                            <div class="panel-body">
                                <div class="row">
                                    <div class="col-md-3">
                                        <span style="display: inline;width:40%;">选择时间：
                                        <select class="form-control" style="width:60%;display: inline;" ng-model="currentDate"
                                        ng-change="changeToAnalysis()">
                                            <option value="{{d}}" ng-repeat="d in dateList">{{d | date:'yyyy-MM-dd' }}</option>
                                        </select></span>
                                    </div>
                                    <div class="col-md-4">
                                        <span style="display: inline;width:40%;">选择模型：
                                        <select class="form-control" style="width:60%;display: inline;" ng-model="currentModel"
                                                ng-change="changeToAnalysis()">
                                            <option value="3">沃尔比重分析</option>
                                            <option value="4">加权评估模型</option>
                                            <option value="1">杜邦分析模型</option>
                                            <option value="2">黑色倒闭模型</option>
                                        </select></span>
                                    </div>
                                    <div class="col-md-2" style="margin-bottom: 0px;padding-bottom: 0px">
                                        <button class="load-btn" id="analysis-btn" ng-click="analysis()" >分析</button>
                                    </div>
                                </div>


                                <div class="row" ng-show="currentModel==1" style="margin-top: 20px;margin-bottom: 20px">

                                    <table width="752" height="222" border="0" class="font_normal" align="center" >
                                        <tr><td width="746" height="20" align="center">净资产收益率
                                            <input name="text0" type="text" class="font_xxx" style='width: 60px' border="0" readonly
                                                   value="{{analysisResult.data.jingzichanshouyilv}}"/>%
                                        </td>
                                        </tr>
                                        <tr><td height="36" align="center"><img src="img/up.gif"/></td></tr>
                                        <tr>
                                            <td height="26" align="center">
                                                <table width="100%" border="0" class="font_normal">
                                                    <tr>
                                                        <td width="49%" height="18" align="center">
                                                            资产利润率
                                                            <input name="text1" type="text" class="font_xxx" style='width: 60px' border="0" readonly
                                                                   value="{{analysisResult.data.zichanlirunlv}}"/>%
                                                        </td>
                                                        <td width="2%" align="center">*</td>
                                                        <td width="49%" align="center">
                                                            权益乘数
                                                            <input name="text2" type="text" class="font_xxx" style='width: 60px' border="0" readonly
                                                                   value="{{analysisResult.data.quanyichengshu}}"/>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="37" align="center">
                                                <table width="100%" border="0" class="font_normal">
                                                    <tr>
                                                        <td width="50%" height="29" align="center" valign="middle"><img src="img/ce2.gif" /></td>
                                                        <td width="50%" height="29" align="center" valign="middle"><img src="img/ce2.gif" /></td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="26" align="center">
                                                <table width="100%" height="22" border="0" class="font_normal">
                                                    <tr>
                                                        <td width="166" height="18" align="center">
                                                            销售净利率
                                                            <input name="text3" type="text" class="font_xxx" style='width: 60px' border="0" readonly
                                                                   value="{{analysisResult.data.xiaoshoujinglilv}}"/>%
                                                        </td>
                                                        <td width="15" align="center" valign="middle">*</td>
                                                        <td width="176" align="center">资产周转率
                                                            <input name="text4" type="text" class="font_xxx" style='width: 60px' border="0" readonly
                                                                   value="{{analysisResult.data.zichanzhouzhuanlv}}"/>%
                                                        </td>
                                                        <td width="177" align="center">
                                                            1/(1-少数权益率
                                                            <input name="text5" type="text" class="font_xxx" style='width: 60px' border="0" readonly
                                                                   value="{{analysisResult.data.shaoshuquanyilv}}"/>%
                                                        </td>
                                                        <td width="18" align="center" valign="middle">-</td>
                                                        <td width="168" align="center">
                                                            资产负债率
                                                            <input name="text6" type="text" class="font_xxx" style='width: 60px' border="0" readonly
                                                                   value="{{analysisResult.data.zichanfuzhailv}}"/>%&nbsp;)
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="36" align="center">
                                                <table width="746" border="0" class="font_normal">
                                                    <tr>
                                                        <td width="177" height="28" align="center">
                                                            <img src="img/do3.gif" /></td>
                                                        <td width="187" align="center">
                                                            &nbsp;&nbsp;&nbsp;&nbsp;<img src="img/do3.gif"/></td>
                                                        <td width="186" height="28" align="center"><img src="img/do3.gif"/></td>
                                                        <td width="178" align="center">
                                                            &nbsp;&nbsp;&nbsp;&nbsp;<img src="img/do3.gif"/></td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="39" align="center">
                                                <table width="100%" border="0" class="font_normal">
                                                    <tr>
                                                        <td width="11%" height="31" align="center">
                                                            净利润
                                                            <br />
                                                            <input name="text7" type="text" class="font_xxx" style='width: 80px'
                                                                   border="0" value="{{analysisResult.data.jinglirun}}"/>
                                                        </td>
                                                        <td width="2%" align="center" valign="bottom">/</td>
                                                        <td width="11%" align="center">
                                                            销售收入
                                                            <br />
                                                            <input name="text8" type="text" class="font_xxx" style='width: 80px'
                                                                   border="0" value="{{analysisResult.data.xiaoshoushouru}}"/></td>
                                                        <td width="11%" align="center">
                                                            销售收入
                                                            <br />
                                                            <input name="text9" type="text" class="font_xxx" style='width: 80px'
                                                                   border="0" value="{{analysisResult.data.xiaoshoushouru}}"/></td>
                                                        <td width="2%" align="center" valign="bottom">/</td>
                                                        <td width="14%" align="center">
                                                            资产总额
                                                            <br />
                                                            <input name="text10" type="text" class="font_xxx" style='width: 80px'
                                                                   border="0" value="{{analysisResult.data.zichanzonge}}"/></td>
                                                        <td width="11%" align="center">少数股东权益<br />
                                                            <input name="text11" type="text" class="font_xxx" style='width: 80px'
                                                                   border="0" value="{{analysisResult.data.shaoshugudongquanyi}}"/></td>
                                                        <td width="1%" align="center" valign="bottom">/</td>
                                                        <td width="14%" align="center">资产总额 <br />
                                                            <input name="text12" type="text" class="font_xxx" style='width: 80px'
                                                                   border="0" value="{{analysisResult.data.zichanzonge}}"/></td>
                                                        <td width="11%" align="center">负债总额<br/>
                                                            <input name="text13" type="text" class="font_xxx" style='width: 80px'
                                                                   border="0" value="{{analysisResult.data.fuzhaizonge}}"/></td>
                                                        <td width="1%" align="center" valign="bottom">/</td>
                                                        <td width="11%" align="center">
                                                            资产总额
                                                            <br />
                                                            <input name="text14" type="text" class="font_xxx" style='width: 80px'
                                                                   border="0" value="{{analysisResult.data.zichanzonge}}"/></td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>

                                </div>
                                <div class="row" ng-show="currentModel==2" style="margin-top: 10px;margin-bottom: 10px">
                                    <div class="col-md-12">
                                        <div class="row">
                                            <div class="col-md-12" ng-show="showResult">
                                                <p><h4>{{analysisResult.result}}</h4></p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row" ng-show="currentModel==3" style="margin-top: 10px;margin-bottom: 10px">
                                    <div class="col-md-12">
                                        <div class="row">
                                            <div class="col-md-12">
                                                <h4>得分：{{analysisResult.count}} (满分100)</h4>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-md-12">
                                                <div id="radarChart_woerbizhong" style="width: 100%;height:400px;" ></div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row" ng-show="currentModel==4" style="margin-top: 10px;margin-bottom: 10px">
                                    <div class="col-md-12">
                                        <div class="row">
                                            <div class="col-md-12" style="margin-top: 10px;margin-bottom: 10px">
                                                <p style="color: red" ng-repeat="i in analysisResult.warning">{{i}}</p>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-md-12">
                                                <div id="radarChart_jiaquanpinggu" style="width: 100%;height:400px;" ></div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>



    </div>




</div>


</body>
</html>